package net.socket;

import java.net.Socket;

public class SocketInfo
{
	public static void main(String[] args)
	{
		for (int i = 0; i < args.length; i++)
		{
			try
			{
				Socket theSocket = new Socket(args[i], 80);
				System.out.println("Connected to " + theSocket.getInetAddress() + "on port" + theSocket.getPort()
						+ "from port" + theSocket.getLocalPort() + "of" + theSocket.getLocalAddress());
			}
			catch (Exception e)
			{
			}
		}
	}
}
